#ifndef TABLE_H
#define TABLE_H

#include <QOpenGLTexture>
#include "geometry_object.h"
#include "../constant.h"

static float tableVertics[] = {
    // 数据顺序x,y,s,t, 其中s,t是纹理坐标
    // 桌面三角形扇
    0.f, 0.f, 0.5, 0.5f,
    TABLE_LEFT, TABLE_FAR, 0.f, 0.9f,
    TABLE_RIGHT, TABLE_FAR, 1.f, 0.9f,
    TABLE_RIGHT, TABLE_NEAR, 1.f, 0.1f,
    TABLE_LEFT, TABLE_NEAR, 0.f, 0.1f,
    TABLE_LEFT, TABLE_FAR, 0.f, 0.9f,
};

class Table : public GeometryObject {
    public:
        explicit Table():GeometryObject() {}; 
        virtual ~Table() = default;

    public:
        inline virtual const float *getVertexData() override {
            return tableVertics;
        };
        inline virtual size_t getVertexPointSize() override {
            return 6;
        };
};
#endif // TABLE_H
